#include "mainwindow.h"

MainWindow::MainWindow(AbstractControllerPtr & ptrController, QWidget *parent) : QMainWindow(parent), m_ptrController(ptrController)
    {
    setupUi(this);
    }

MainWindow::~MainWindow()
    {

    }

void MainWindow::on_m_btn_clicked()
    {
    double data = m_spin->value();
    m_ptrController.data()->setData(data);
    }

void MainWindow::update(double before, double)
    {
    m_lbl->setText(QString::number(before));
    }
